﻿using System.Collections.Generic;
using Battle.Net.Infrastructure;

namespace Battle.Net.Model
{
    public class CharacterOptions
    {
        public CharacterOptions()
        {
            Fields = new List<CharacterField>();
        }

        public CharacterOptions(params CharacterField[] fields)
        {
            Fields = new List<CharacterField>();
            foreach (var f in fields)
                Fields.Add(f);
        }

        public void Add(CharacterField field)
        {
            Fields.Add(field);
        }

        private List<CharacterField> Fields { get; set; }

        public override string ToString()
        {
            if (Fields.Count > 0)
            {
                var result = "?fields=";

                foreach (var field in Fields)
                {
                    result += field.ToEnumString() + ",";
                }
                return result;
            }

            return "";

        }
    }
}
